<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<%@ page contentType="text/html;charset=utf-8" pageEncoding="utf-8"
	language="java"%>
<%@ include file="/jsp/platform/include/include.jsp"%>
<script src="<%=request.getContextPath()%>/script/jquery-1.4.2.js"
	type="text/javascript"></script>
<LINK href="<%=request.getContextPath()%>/style/easyui.css" rel="stylesheet" type="text/css">
<SCRIPT src="<%=request.getContextPath()%>/script/jquery.easyui.min.js" type="text/javascript"></SCRIPT>	
<SCRIPT src="<%=request.getContextPath()%>/script/common.js" type="text/javascript"></SCRIPT>	
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style type="text/css">
* {
	padding: 0;
	margin: 0;
}

body {
	color: #4e4e4e;
}

li {
	list-style: none;
}

a {
	text-decoration: none;
}

input,img,select {
	vertical-align: middle;
}

.modalWindowWrapper {
	padding: 20px;
}

.listWrapper {
	width: 350px;
	margin: 0 auto;
	overflow: hidden;
	padding: 0 0 10px;
}

.listLeft,.listRight {
	display: block;
	height: 40px;
	line-height: 40px;
	font-family: microsoft yahei;
	font-size: 16px;
}

.listLeft {
	width: 120px;
	text-align: right;
	float: left;
}

.listRight {
	width: 220px;
	padding-left: 10px;
	float: right;
}

.btnConfirm,.btnCancel {
	display: block;
	width: 80px;
	height: 40px;
	line-height: 40px;
	text-align: center;
	font-family: microsoft yahei;
	font-size: 16px;
	float: left;
	border: none;
	cursor: pointer;
}

.btnConfirm {
	background: #c2352a;
	color: #fff;
}

.btnCancel {
	background: #d7d7d7;
	color: #4e4e4e;
	margin-left: 40px;
}
</style>
<script type="text/javascript">
        $(document).ready(function() {
        })
        /**
         　　               修改
         */
        function modifySubmit() {
            var checkStr =   "need|operatorName|操作员名称|"+ $("#operatorName").val()+";"
		                    +"need|loginName|登陆名|"+ $("#loginName").val()+";"
		                    +"need|loginPassword|登陆密码|"+ $("#loginPassword").val()+";"
		                    +"mobile|telephone|手机号|"+ $("#telephone").val()+";"
		                    ;
		        //检验所有规则
				if (!checkAll(checkStr)) {
					return false;
				}
                var operatorId = $("#operatorId").val();
                var url = '<%=request.getContextPath()%>/manage/operatorInfo/update';
                if (operatorId == 'add') {
                    url = '<%=request.getContextPath()%>/manage/operatorInfo/add';
                    operatorId = "";
                }
                $.post(
                        url,
                        {
                            'operatorId' : operatorId,
                            'createDate' : $("#createDate").val(),
                            'updateDate' : $("#updateDate").val(),
                            'lastLogintime' : $("#lastLogintime").val(),
                            'operatorName' : $("#operatorName").val(),
                            'loginName' : $("#loginName").val(),
                            'loginPassword' : $("#loginPassword").val(),
                            'telephone' : $("#telephone").val(),
                            'status' : $("#status").val()
                        },
                        function(data) {
                            if (data.success) {
                                $.messager.alert("提示信息", data.msg,"info",function(){
						           window.parent.document.location = window.parent.document.location;
						           parentDialog.close();
						        });
                            } else {
                                $.messager.alert("提示信息", data.msg);
                            }
                        });
        }
        function Btnclose() {
            parentDialog.close();
        }
        function isBlank(obj) {
		    if ("" == obj || undefined == obj) {
		        return true;
		    }
		    return false;
		}
    </script>
</head>

<body>
	<div class="modalWindowWrapper">
		<input type="hidden" id="operatorId" name="operatorId"
			value="<c:out value='${model.operatorId}'/>" />
		<input type="hidden" id="createDate" name="createDate"
			value="<fmt:formatDate value='${model.createDate}' type='both'/>" />
		<input type="hidden" id="updateDate" name="updateDate"
			value="<fmt:formatDate value='${model.updateDate}' type='both'/>" />
		<input type="hidden" id="lastLogintime" name="lastLogintime"
			value="<fmt:formatDate value='${model.lastLogintime}' type='both'/>" />
		<ul class="listWrapper">
			<li class="listLeft">操作员名称：</li>
			<li class="listRight"><input type="text"
				style="width:210px;height:34px;line-height:34px;float:left;"
				name="operatorName" id="operatorName"
				value="<c:out value='${model.operatorName}'/>" /></li>
		</ul>
		<ul class="listWrapper">
			<li class="listLeft">登录名：</li>
			<li class="listRight"><input type="text"
				style="width:210px;height:34px;line-height:34px;float:left;"
				name="loginName" id="loginName"
				value="<c:out value='${model.loginName}'/>" /></li>
		</ul>
		<ul class="listWrapper">
			<li class="listLeft">登录密码：</li>
			<li class="listRight"><input type="password"
				style="width:210px;height:34px;line-height:34px;float:left;"
				name="loginPassword" id="loginPassword"
				value="<c:out value='${model.loginPassword}'/>" /></li>
		</ul>
		<ul class="listWrapper">
			<li class="listLeft">手机号：</li>
			<li class="listRight"><input type="text"
				style="width:210px;height:34px;line-height:34px;float:left;"
				name="telephone" id="telephone"
				value="<c:out value='${model.telephone}'/>" /></li>
		</ul>
		<ul class="listWrapper">
			<li class="listLeft">操作员状态：</li>
			<li class="listRight"><SELECT id="status"
				name="status" value="<c:out value='${model.status}'/>"
				style="display: block; border: none; width: 120px; height: 30px; line-height: 30px; float: left; font-size: 14px;">
					<OPTION style="padding: 5px 0; text-align: center;"
						id="status_T" value="I" <c:if test="${model.status == 'I'}">selected</c:if>>开启</OPTION>
					<OPTION style="padding: 5px 0; text-align: center;"
						id="status_F" value="S" <c:if test="${model.status == 'S'}">selected</c:if>>关闭</OPTION>
			</SELECT></li>
		</ul>
		<div
			style="width:200px;margin:0 auto;overflow:hidden;padding-top:10px;">
			<input class="btnConfirm" type="button" onclick="modifySubmit()"
				value="确定" /> <input class="btnCancel" type="button"
				onclick="Btnclose()" value="取消" />
		</div>
	</div>
</body>
</html>
